drop table seller;
create table seller(
	sellerId varchar2(50) primary key,
	sellerName varchar2(50) not null,
	sellerAddress varchar2(50) not null,
	sellerInfo varchar2(1000) not null
)
insert into seller(sellerId,sellerName,sellerAddress,sellerInfo) values('java','강해용','인천','해용이~')
select * from seller
drop table product;
create table product(
	productId number primary key,
	productName varchar(50) not null,
	productPrice number not null,
	productMaker varchar(50) not null,
	productDate date not null,
	productInfo varchar(1000) not null,
	productTitle varchar(1000) not null,
	productAvailable number default 1,
	productCategory varchar(50) not null,
	sellerId varchar(50) not null
)
create sequence productId_seq
insert into product (productId,productName,productPrice,productMaker,productDate,productInfo,productTitle,productAvailable,productCategory,sellerId)
values (productId_seq.nextval,'갤럭시5',1200,'삼성',sysdate,'성능좋음','싸게팔아요~',default,'휴대폰/스마트폰','java');
select * from product
delete from product  where productId=1
drop table category;

create table inventory(
	inventoryAmount number default 0,
	salesVolume number default 0,
	productId number constraint fk_product_id references product,
	sellerId varchar2(50) constraint fk_seller_id references seller
)


create table category(
	categoryName varchar2(50) primary key
)

insert into category(categoryName) values('의류')
insert into category(categoryName) values('휴대폰/스마트폰')
insert into category(categoryName) values('컴퓨터')
insert into category(categoryName) values('가전')
insert into category(categoryName) values('가구')
insert into category(categoryName) values('식품')
insert into category(categoryName) values('자동차용품')
select categoryName from category
drop table consumer
create table consumer(
	id varchar2(50) primary key,
	password varchar2(50) not null,
	name varchar2(50) not null,
	point number default 0,
	totalPoint number default 0,
	grade varchar2(50) default 'new'
)








